/*
 *
 * Copyright (c) 2007, LilyStudio Nanjing University.
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *  * Neither the name of LilyStudio Nanjing University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.lilystudio.veryftp.model;

import java.util.Date;
import java.util.Set;
import java.util.HashSet;

//import org.hibernate.search.annotations.Analyzer;
import org.hibernate.search.annotations.Analyzer;
import org.hibernate.search.annotations.ContainedIn;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

/**
 * FTPSite generated by MyEclipse Persistence Tools and modified by Goodtiger
 * 
 * @author Goodtiger
 * @version Oct 25, 2007
 */
@Indexed(index="FTPSites")
@Analyzer(impl=org.lilystudio.veryftp.analyzer.VeryAnalyzer.class)
public class FTPSite implements java.io.Serializable {

	private static final long serialVersionUID = -2178279146050281599L;
	
	@DocumentId(name="siteId")
	private Long siteId;
	
	@Field(index=Index.NO,store=Store.YES)
	private String siteDnsName;
	
	@Field(index=Index.NO,store=Store.YES)
	private String siteIp;
	
	@Field(index=Index.NO,store=Store.YES)
	private String siteUsername;
	
	@Field(index=Index.NO,store=Store.YES)
	private String sitePassword;
	
	private Date siteJoinTime;
	
	private int sitePort;
	
	@ContainedIn
	private Set<ParentFile> files=new HashSet<ParentFile>();	

	public FTPSite() {
	}		
	
	public FTPSite(FTPSite site){
		this.siteId=site.siteId;
		this.siteDnsName=site.siteDnsName;
		this.siteIp=site.siteIp;
		this.siteJoinTime=site.siteJoinTime;
		this.sitePassword=site.sitePassword;
		this.siteUsername=site.siteUsername;
		
	}
	public Set<ParentFile> getFiles() {
		return files;
	}

	public void setFiles(Set<ParentFile> files) {
		this.files = files;
	}


	public Long getSiteId() {
		return siteId;
	}

	public void setSiteId(Long siteId) {
		this.siteId = siteId;
	}

	public String getSiteDnsName() {
		return siteDnsName;
	}

	public void setSiteDnsName(String siteDnsName) {
		this.siteDnsName = siteDnsName;
	}
	
	public String getSiteIp() {
		return siteIp;
	}

	public void setSiteIp(String siteIp) {
		this.siteIp = siteIp;
	}


	public Date getSiteJoinTime() {
		return siteJoinTime;
	}


	public void setSiteJoinTime(Date siteJoinTime) {
		this.siteJoinTime = siteJoinTime;
	}


	public String getSiteUsername() {
		return siteUsername;
	}

	public void setSiteUsername(String siteUsername) {
		this.siteUsername = siteUsername;
	}

	public String getSitePassword() {
		return sitePassword;
	}

	public void setSitePassword(String sitePassword) {
		this.sitePassword = sitePassword;
	}

	public int getSitePort() {
		return sitePort;
	}

	public void setSitePort(int sitePort) {
		this.sitePort = sitePort;
	}

}